module top_module( 
    input [99:0] a, b,
    input cin,
    output cout,
    output [99:0] sum );

    wire [99:0] carry;

    adder1 inst_adder0 (a[0], b[0], cin, carry[0], sum[0]);
    adder1 inst_adder[99:1] (a[99:1], b[99:1], carry[98:0], carry[99:1], sum[99:1]);

    assign cout = carry[99];

    // The concatenation {cout, sum} is a 101-bit vector.
	//assign {cout, sum} = a+b+cin;

endmodule

module adder1( 
    input a, b, cin,
    output cout, sum );

    // assign sum = a ^ b ^ cin;
    // assign cout = a&b | a&cin | b&cin;

    assign{cout,sum} = a + b + cin;

endmodule
